home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS26.ADF / SoundScape / AztecLib / README < prev    next >
Text File  |  1989-01-26  |  2KB  |  37 lines

  1. If you are using Aztec 2.0 or earlier,
  2. because of different register passing conventions, a little extra
  3. work is involved in getting Aztec modules to run.
  4.  
  5. Aztec doesn't obey the Amiga register trashing conventions.  Normally,
  6. this is no problem since an Aztec program only calls Aztec routines, and
  7. things are set straight when system calls are made.
  8.  
  9. But with a SoundScape module, we run into an interesting problem:
  10. You provide routines that SoundScape calls.  SoundScape assumes that
  11. your routine will only trash register D0, D1, A0, and A1.  However,
  12. Aztec considers A6 and D3 to be scratch registers.  In addition, Aztec
  13. needs A4 loaded with its Data Segment pointer.
  14.  
  15. So, there are two routines your Aztec code needs to call.  On entering
  16. an Aztec function that is called by SoundScape, call `enteraztec()'.
  17. This saves several registers on the stack and loads A4 with the proper
  18. pointer.  When leaving your routine, call `leaveaztec'.  This reloads
  19. the saved registers from the stack.
  20.  
  21. These routines are in the file `aztec.asm'.  The assembled code is
  22. `aztec.o'.  
  23.  
  24. Use these routines entering and leaving your opencode, closecode, 
  25. outcode, and editcode routines.  In addition, if you use FunctionCall,
  26. you'll need to stick these in the function that is called (since
  27. it ends up being called by another process.)    
  28.  
  29. By the way, this comes in handy anytime you are writing
  30. code that gets called by the system.  For example, if you are writing
  31. an interrupt handler, you run into the same issues, which these 
  32. routines will fix.
  33.  
  34. Good luck!
  35.  
  36. Todor
  37.